
function formatMoney(value){
    if(value !== undefined && value !== null) {
        if(Number(value) >= 100000000) {
          return Number((Number(value) / 100000000)).toFixed(2)+"Y"
        } else if(Number(value) > 10000000){
          return Number((Number(value) / 10000)).toFixed(2)+"W"
        }else if(Number(value) > 10000){
            return Number((Number(value) / 10000)).toFixed(2)+"w"
        }else if(Number(value) <-10000){
            return Number((Number(value) / 10000)).toFixed(2)+"W"
        }else{
             return parseInt(value)
        }
      }else{
        return 0;
      }
}

function __getNumPart(num, max) {
  num = Number(num);
  if(num < 10){
      max = Math.min(max, 3);
      num = (num *Math.pow(10,max))/Math.pow(10,max);
  }else if(num < 100){
      max = Math.min(max, 2);
      num = (num *Math.pow(10,max))/Math.pow(10,max);
  }else if(num < 1000){
      max = Math.min(max, 1);
      num = (num *Math.pow(10,max))/Math.pow(10,max);
  }
  return num;
}

function getOmitNum(num, max) {
  num = Number(num);
  if(num > 100000000){
      num = this.__getNumPart(num/100000000, max);
      return num.toFixed(2) + "Y";
  }else if(num > 10000){
      num = this.__getNumPart(num/10000, max);
      return num.toFixed(2) + "w";
  }
  return num.toFixed(1);
}